package com.ruoyi.project.system.reservation.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.reservation.mapper.ReservationMapper;
import com.ruoyi.project.system.reservation.domain.Reservation;
import com.ruoyi.project.system.reservation.service.IReservationService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 预约记录 服务层实现
 * 
 * @author zhangshilin
 * @date 2019-06-26
 */
@Service
public class ReservationServiceImpl implements IReservationService 
{
	@Autowired
	private ReservationMapper reservationMapper;

	/**
     * 查询预约记录信息
     * 
     * @param reservationId 预约记录ID
     * @return 预约记录信息
     */
    @Override
	public Reservation selectReservationById(Integer reservationId)
	{
	    return reservationMapper.selectReservationById(reservationId);
	}
	
	/**
     * 查询预约记录列表
     * 
     * @param reservation 预约记录信息
     * @return 预约记录集合
     */
	@Override
	public List<Reservation> selectReservationList(Reservation reservation)
	{
	    return reservationMapper.selectReservationList(reservation);
	}
	
    /**
     * 新增预约记录
     * 
     * @param reservation 预约记录信息
     * @return 结果
     */
	@Override
	public int insertReservation(Reservation reservation)
	{
	    return reservationMapper.insertReservation(reservation);
	}
	
	/**
     * 修改预约记录
     * 
     * @param reservation 预约记录信息
     * @return 结果
     */
	@Override
	public int updateReservation(Reservation reservation)
	{
	    return reservationMapper.updateReservation(reservation);
	}

	/**
     * 删除预约记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteReservationByIds(String ids)
	{
		return reservationMapper.deleteReservationByIds(Convert.toStrArray(ids));
	}
	
}
